package vip.liux.contracts.repositories.pay;

import org.springframework.data.repository.ListCrudRepository;
import org.springframework.data.repository.ListPagingAndSortingRepository;
import org.springframework.data.repository.NoRepositoryBean;
import vip.liux.contracts.models.pay.PayChannel;
import vip.liux.contracts.shared.enums.Status;

import java.util.Collection;
import java.util.List;

@NoRepositoryBean
public interface PayChannelRepository extends ListPagingAndSortingRepository<PayChannel, Long>, ListCrudRepository<PayChannel, Long> {

    List<PayChannel> findByAppIdIn(Collection<Long> appIds);

    PayChannel findByAppIdAndCode(Long appId, String code);

    List<PayChannel> findByAppIdAndStatus(Long appId, Status status);
}
